﻿using System;
using Ayatta.Contract.Domain;

namespace Web.Core.OnlinePays
{
    public static class OnlinePayFactory
    {
        public static IOnlinePay Create(PaymentPlatform platform)
         {
             switch (platform.Id)
             {
                 case Platform.ChinaPay:
                     return new ChinaPay(platform);
                 case Platform.TenPay:
                     return new TenPay(platform);
                 case Platform.AliPay:
                     return new TenPay(platform);
                 default: throw new NotSupportedException();
             }
         }
    }
}